/* 重置基础样式 */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* 引入鸿蒙字体 */
@font-face {
  font-family: 'HarmonyOS Sans';
  src: url('./fonts/HarmonyOS_Sans_Medium.ttf') format('truetype');
  font-weight: normal;
  font-style: normal;
}

/* 设置根元素字体大小，方便使用 rem */
html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: 'HarmonyOS Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  line-height: 1.5;
  color: #333;
  background-color: #fff;
}

/* 移除列表样式 */
ul, ol {
  list-style: none;
}

/* 移除链接下划线 */
a {
  text-decoration: none;
  color: inherit;
}

/* 图片默认样式 */
img {
  max-width: 100%;
  height: auto;
  vertical-align: middle;
}

/* 清除浮动 */
.clearfix::after {
  content: '';
  display: table;
  clear: both;
}

/* 常用flex布局类 */
.flex {
  display: flex;
}

.flex-center {
  display: flex;
  justify-content: center;
  align-items: center;
}

.flex-between {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* 文本溢出省略号 */
.text-ellipsis {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* 鼠标样式 */
.pointer {
  cursor: pointer;
}

/* 自定义滚动条样式 */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: #f5f7fa;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb {
  background: #c0d7f3;
  border-radius: 4px;
  transition: all 0.3s ease;
}

::-webkit-scrollbar-thumb:hover {
  background: #4A90E2;
}

/* 火狐浏览器滚动条 */
* {
  scrollbar-width: thin;
  scrollbar-color: #c0d7f3 #f5f7fa;
}

/* 隐藏特定元素的滚动条但保持可滚动 */
.hide-scrollbar {
  -ms-overflow-style: none;  /* IE and Edge */
  scrollbar-width: none;     /* Firefox */
}

.hide-scrollbar::-webkit-scrollbar {
  display: none;             /* Chrome, Safari and Opera */
}
